﻿namespace UnityEngine
{
    using System;
    using System.Runtime.CompilerServices;

    public sealed class iPhoneInput
    {
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall, Obsolete("GetAccelerationEvent method is deprecated. Please use Input.GetAccelerationEvent instead.")]
        public static extern iPhoneAccelerationEvent GetAccelerationEvent(int index);
        [MethodImpl(MethodImplOptions.InternalCall), Obsolete("GetTouch method is deprecated. Please use Input.GetTouch instead."), WrapperlessIcall]
        public static extern iPhoneTouch GetTouch(int index);

        [Obsolete("acceleration property is deprecated. Please use Input.acceleration instead.")]
        private static Vector3 _acceleration;
        public static Vector3 acceleration
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get
            {
                return _acceleration;
            }
        }

        [Obsolete("accelerationEventCount property is deprecated. Please use Input.accelerationEventCount instead.")]
        private static int _accelerationEventCount;
        public static int accelerationEventCount { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get { return _accelerationEventCount; } }

        [Obsolete("accelerationEvents property is deprecated. Please use Input.accelerationEvents instead.")]
        public static iPhoneAccelerationEvent[] accelerationEvents
        {
            get
            {
                int accelerationEventCount = iPhoneInput.accelerationEventCount;
                iPhoneAccelerationEvent[] eventArray = new iPhoneAccelerationEvent[accelerationEventCount];
                for (int i = 0; i < accelerationEventCount; i++)
                {
                    eventArray[i] = GetAccelerationEvent(i);
                }
                return eventArray;
            }
        }

        [Obsolete("lastLocation property is deprecated. Please use Input.location.lastData instead.")]
        public static LocationInfo lastLocation { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        [Obsolete("multiTouchEnabled property is deprecated. Please use Input.multiTouchEnabled instead.")]
        public static bool multiTouchEnabled { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        [Obsolete("orientation property is deprecated. Please use Input.deviceOrientation instead.")]
        public static iPhoneOrientation orientation { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        [Obsolete("touchCount property is deprecated. Please use Input.touchCount instead.")]
        public static int touchCount { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        [Obsolete("touches property is deprecated. Please use Input.touches instead.")]
        public static iPhoneTouch[] touches
        {
            get
            {
                int touchCount = iPhoneInput.touchCount;
                iPhoneTouch[] touchArray = new iPhoneTouch[touchCount];
                for (int i = 0; i < touchCount; i++)
                {
                    touchArray[i] = GetTouch(i);
                }
                return touchArray;
            }
        }
    }
}

